<?php 
include_once("../../../configuracion/config.php");
$operacion ="Personal > Actualizar experiencia acad&eacute;mica"
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/plantillaAdmin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Axperiencia acad&eacute;mica</title>
<!-- InstanceEndEditable -->
<link rel="stylesheet" type="text/css" href="../../css/estilo.css"/>
<link rel="SHORTCUT ICON" href="../../../logo/unc.ico"/>
<!-- InstanceBeginEditable name="head" -->
	
<script type="text/javascript" src="../../js/mootools.js"></script>
<script type="text/javascript" src="../../js/fValidator-full.js"></script>
<script type="text/javascript" src="../../js/fckeditor/fckeditor.js"></script>
<script>
 window.addEvent('domready', function(){
	$('fexpAcademica').addEvent('submit', function(e) {
    		
	     //alert(FCKeditorAPI.GetInstance('contResearch').GetXHTML());
		var content = FCKeditorAPI.GetInstance('contExpAc').GetXHTML(); // recupera el contenido del editor
		$('contExpAc').setProperty('value',content); //actualiza el objdom 
		new Event(e).stop();
		if(content!=""){
				
				var log = $('experiencia').empty().addClass('ajax-loading');
				this.send({
							update: log,
							onComplete: function() {
							log.removeClass('ajax-loading');
						}
				});
		}else alert('sin contenido');	
	});
}); 

function FCKeditor_OnComplete( editorInstance ){
	 //new Event(ev).stop();
	 //Enviamos una peticion a recibe.php	
	 var miJSON = new Json.Remote("ajax.form/expAcademica_datos.php",{
 			onComplete: function(objeto){
				if(objeto.contenido==null){
				//alta
					
					$('fexpAcademica').action ="ajax.form/expAcademica_add.php";
					editorInstance.SetHTML("Ingresar contenido Expriencia académica" ) ;
					$('botonSubmit').value = "Guardar";
				}else{
				//modificacion
					$('fexpAcademica').action ="ajax.form/expAcademica_edit.php";
					//$('contResearch').value = objeto.contenido;
					editorInstance.SetHTML(objeto.contenido ) ;
					$('botonSubmit').value = "Actualizar";
				
				}
			 }
	});	
	miJSON.send();
	
};


</script>
<!-- InstanceEndEditable -->

</head>

<body>

<?php include('../estructura/encabezado.php');?>
<div class="menuIzqquierdo">

<?php include('../menu/menuIzq.html');?>

</div>
<div class="content"><!-- InstanceBeginEditable name="EditRegion3" -->
<div id="ajax_bar">
<span class="operacion"><?php echo $operacion; ?></span>
<form id="fexpAcademica"  method="post" name="fexpAcademica">
<?php include('int_expAcad.php'); ?>
    <input id="botonSubmit" type="submit"name="botonSubmit"/>	

</form>
</div>
<div id="info">

		<div id="experiencia"><!-- spanner --></div>
</div>

<!-- InstanceEndEditable --></div>
<?php include('../estructura/pie.php');?>
</body>
<!-- InstanceEnd --></html>
 